package com.ims.util;

import cn.hutool.crypto.asymmetric.KeyType;
import cn.hutool.crypto.asymmetric.SM2;

public class DecryptUtil {
    private static final String privateKey = "MIGTAgEAMBMGByqGSM49AgEGCCqBHM9VAYItBHkwdwIBAQQg6kjsAxkS8v3fMDtXKHvPHyBrT22GKh8aEiekExjMaK2gCgYIKoEcz1UBgi2hRANCAATKzUNLsXBilMEvyuIxl0Kd3PGuv7NC5ULVMPLyD7l8DcAen4AnqudGpmrFztsNjfLptRehF9IStvcwF4mGgxiR";
    public static final SM2 sm2 = new SM2(privateKey, null);

    public static String sm2Decrypt(String msg){
        return sm2.decryptStr(msg, KeyType.PrivateKey);
    }
}
